from flask_sqlalchemy import SQLAlchemy
from flask_login import LoginManager





db = SQLAlchemy()
login_manager = LoginManager()
class ServiceError(Exception):
    """服务层基类异常"""
    pass

class NotFoundError(ServiceError):
    """资源未找到异常"""
    pass

class BookNotAvailableError(ServiceError):
    """图书不可用异常"""
    pass

